//
//  XuanZeKeShiEditeContentView.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/6/5.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "XuanZeKeShiEditeContentView.h"

@implementation XuanZeKeShiEditeContentView
- (instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        [self initSubView];
    }
    return self;
}
- (void)initSubView{
    self.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.leftTitleLabel];
    [self addSubview:self.rightDataView];
    
    [_leftTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.mas_centerX).offset(-70);
        make.width.equalTo(@80);
        make.height.equalTo(@40);
        make.centerY.equalTo(self.mas_centerY);
    }];
    [_rightDataView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self->_leftTitleLabel.mas_right);
        make.width.equalTo(@230);
        make.height.equalTo(@80);
        make.centerY.equalTo(self.mas_centerY);
    }];
}
- (UILabel *)leftTitleLabel{
    if (!_leftTitleLabel) {
        UILabel *label = [[UILabel alloc]init];
        label.text = @"测试标题:";
        label.textColor = TITLECOLOR;
        label.font = [UIFont systemFontOfSize:14];
        _leftTitleLabel = label;
    }
    return _leftTitleLabel;
}
- (UITextView *)rightDataView{
    if (!_rightDataView) {
        UITextView *view = [[UITextView alloc]initWithFrame:CGRectMake(self.frame.size.width/2-60, 5, 280, 80)];
        view.font = [UIFont systemFontOfSize:13];
        view.backgroundColor = [UIColor whiteColor];
        view.layer.borderColor = LINCOLOR.CGColor;
        view.layer.borderWidth = 1;
        view.layer.cornerRadius = 3;
        view.layer.masksToBounds = YES;
        _rightDataView = view;
    }
    return _rightDataView;
}

@end
